package com.xdwanj.smartcity.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

import com.xdwanj.smartcity.R;

public class NewsActivity extends AppCompatActivity {

    WebView webView;
    Intent dataIntent;
    String data;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news);

        webView = findViewById(R.id.news_view);
        dataIntent = getIntent();
        data = dataIntent.getStringExtra("html");
        if (data != null) {
            webView.loadData(data,"text/html","UTF-8");
        }
    }
}